<?php
/**
 * PlaceController.php
 * @author wuxin
 * @date 2020/8/10 13:45
 * @copyright xshoppy.com
 */

namespace backend\controllers;

use backend\actions\IndexAction;
use common\services\PlaceServiceInterface;
use yii\web\Controller;

class PlaceController extends Controller
{

    public function actions()
    {
        /**
         * @var PlaceServiceInterface $service
         */
        $service = \Yii::$app->get(PlaceServiceInterface::ServiceName);
        return [
            'index' => [
                'class' => IndexAction::class,
                'data' => function(array $params) use ($service) {
                    $data = $service->getList($params);
                    return [];
                }
            ]
        ];
    }

}